<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Dynatree issue ISSUE_NUMBER</title>
	<script src="../jquery/jquery.js" type="text/javascript"></script>
	<script src="../jquery/jquery-ui.custom.js" type="text/javascript"></script>
	<script src="../jquery/jquery.cookie.js" type="text/javascript"></script>

	<link href="../src/skin/ui.dynatree.css" rel="stylesheet" type="text/css" id="skinSheet">
	<script src="../src/jquery.dynatree.js" type="text/javascript"></script>

	<style type="text/css">
	#tree{
		height: 250px;
	}
	</style>

	<script  type="text/javascript">

	var treeData = [
		{title: "Node 1" },
		{title: "Node 2", select: true },
		{title: "Folder 3", key: "id3", expand: true,
		  children: [
			{title: "Sub-item 3.1 (active on init)", activate: true,
			  children: [
				{title: "Sub-item 3.1.1", key: "id3.1.1" },
				{title: "Sub-item 3.1.2", key: "id3.1.2" }
			  ]
			},
			{title: "Sub-item 3.2 (selected on init)", selected: true, folder: true,
			  children: [
				{title: "Sub-item 3.2.1", key: "id3.2.1" },
				{title: "Sub-item 3.2.2", key: "id3.2.2" }
			  ]
			}
		  ]
		}
		];

$(function () {
	$("#tree").dynatree({
		// checkbox: true,
		// selectMode: 3,
		children: treeData,
		// initAjax: {
		// 	url: "sample-data3.json"
		// },
		// onLazyRead: function(node){
		// 	// Mockup a slow reqeuest ...
		// 	node.appendAjax({
		// 		url: "sample-data2.json",
		// 		debugLazyDelay: 750 // don't do this in production code
		// 	});
		// },
		onActivate: function(node) {
			$("#echoActive").text("" + node + " (" + node.getKeyPath()+ ")");
		}
	});
	$("#btn1").click(function(e){
		var tree = $("#tree").dynatree("getTree"),
			node = $("#tree").dynatree("getActiveNode");
		var n1 = tree.getNodeByKey("id3.1.1");
		alert("1");
	});
	$("#btn2").click(function(e){
		var node = $("#tree").dynatree("getActiveNode");
		alert("2");
	});
});
	</script>
</head>
<body>
	<h3>Dynatree issue ISSUE_NUMBER</h3>
	<p><a href="https://code.google.com/p/dynatree/issues/detail?id=123">LINK</a></p>
	<p>Steps to reproduce:</p>
	<ol>
	<li>foo
	<li>bar
	</ol>
	<div id="tree">
	</div>
	<div>Active node: <span id="echoActive">-</span></div>

	<button id="btn1">Action 1</button>
	<button id="btn2">Action 2</button>
</body>
</html>
